<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../common/common.jsp"%>   
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>全部订单</title>
		<link href="${ctx }/js/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
   	    <link href="${ctx }/js/bootstrap/css/bootstrap-datetimepicker.css" rel="stylesheet" media="screen">
		<link rel="stylesheet" href="${ctx }/css/reset.css" />
		<link rel="stylesheet" href="${ctx }/css/public.css" />
		<link rel="stylesheet" href="${ctx }/css/style.css" />
        <link rel="stylesheet" href="${ctx }/css/layui.css">
		<script type="text/javascript" src="${ctx }/js/layer-v1.9.2/layer/layer.js"></script>
        <script type="text/javascript" src="${ctx}/js/layer-v1.9.2/layer/layui.js"></script>
		<style type="text/css">
			.load-line {
				position: fixed;
				top: 0;
				width: 0;
				height: 2px;
				background-color: red;
			}
		</style>
		<script type="text/javascript">
		</script>
	</head>
	<body>
		<!--头部-->
		<%@include file="../common/header.jsp"%>
		<%@include file="../common/headerMemberInfo.jsp"%>
		<div class="vip_main all_order container clearfix">
			<div class="left l">
				<ul class="f14 three">
					<%-- <li>我的资料
						<ul>
							<li><a href="${ctx }/member/vip_safe_setting">个人信息</a></li>
							<li><a href="/sc-site/member/vip_safe_setting" >安全设置</a></li>
						</ul>
					</li> --%>
					<li><a href="${ctx }/member/my_collection" >我的收藏</a></li>
					<!-- <li>优惠特权
						<ul>
							<li><a href="">优惠券</a></li>
						</ul>
					</li> -->
					<li><a href="${ctx}/tracks/initTracks">我的足迹</a></li>
					<!-- <li>收货地址</li> -->
					<li class="last">我的订单
						<ul>
							<li><a href="${ctx}/order/orderPage?queryStatus=0" class="red">全部订单</a></li>
							<li><a href="${ctx}/order/orderPage?queryStatus=1">待付款</a></li>
							<li><a href="${ctx}/order/orderPage?queryStatus=2">待发货</a></li>
							<li><a href="${ctx}/order/orderPage?queryStatus=3">待收货</a></li>
							<li><a href="${ctx}/order/orderPage?queryStatus=4">待评价</a></li>
							<li><a href="${ctx}/order/orderPage?queryStatus=5">退款退货</a></li>
						</ul>
					</li>
				</ul>
			</div>
	
			<div class="right r clearfix">
				<div class="my_info" >
					<span><a href="${ctx }/member/vip_safe_setting"><img src="${ctx }/images/header.png" id="mImg" alt="" /></a></span>
					<a href=" ${ctx }/member/vip_set_address">我的收货地址</a>
					<!-- <a href="">我的优惠信息</a> -->
				</div>
				<div class="order_info">
				   <input type="hidden"  id="queryStatus" value="${param.queryStatus }"/>
					<div class="state" >
						<!-- 0：全部,1：待付款,2:待发货，3:待收货，4：待评价 ，5：退换货 -->
						<a href="${ctx}/order/orderPage?queryStatus=0" class="red" >全部</a>
						<a href="${ctx}/order/orderPage?queryStatus=1" >待付款</a>
						<a href="${ctx}/order/orderPage?queryStatus=2" >待发货</a>
						<a href="${ctx}/order/orderPage?queryStatus=3" >待收货</a>
						<a href="${ctx}/order/orderPage?queryStatus=4" >待评价</a>
						<a href="${ctx}/order/orderPage?queryStatus=5" class="last">退款退货</a>
					</div>
					<form action="">
						<p class="clearfix">
							<input type="text" name="likeStr" placeholder="订单号" />
							<a href="javascript:;" id="highLevelSearch">搜索</a>	
							<span class="unfold_expert">高级<img src="${ctx }/images/top1.png" alt="" /></span>
						</p>
						<div class="expert clearfix">
							<div class="clearfix">
								<p>
									<label for="">订单类型</label>
									<select name="orderStatus">	
									    <option value="4" <c:if test='${param.queryStatus ==0}'> selected</c:if>>全部</option>
										<option value="0" <c:if test='${param.queryStatus ==1 || param.queryStatus ==2 || param.queryStatus ==3 || param.queryStatus ==4}'> selected</c:if>>未完成订单</option>
										<option value="1">已作废</option>
										<option value="2">活动订单</option>
										<option value="3">已完成订单</option>
									</select>
								</p>
								<p>
									<label for="">成交时间</label>
									<input size="16" type="text" name="startTime" readonly class="form_datetime"> -
									<input size="16" type="text" name="endTime" readonly class="form_datetime">
								</p>
								<p>
									<label for="">评价状态</label>
									<select name="commentStatus">
										<option value="0" <c:if test='${param.queryStatus ==1}'> selected</c:if>>全部</option>
										<option value="1">我已评价</option>
										<option value="2" <c:if test='${param.queryStatus ==4}'> selected</c:if>>我未评价</option>
									</select>
								</p>
								<p>
									<label for="">交易状态</label>
									<select name="queryStatus">
										<option value="0">全部</option>
										<option value="1" <c:if test='${param.queryStatus ==1}'> selected</c:if>>待付款</option>
										<option value="2" <c:if test='${param.queryStatus ==2}'> selected</c:if>>待发货</option>
										<option value="3" <c:if test='${param.queryStatus ==3}'> selected</c:if>>待收货</option>
										<option value="4" <c:if test='${param.queryStatus ==4}'> selected</c:if>>待评价</option>
										<option value="5" <c:if test='${param.queryStatus ==5}'> selected</c:if>>退款订单</option>
										<option value="6" <c:if test='${param.queryStatus ==6}'> selected</c:if>>交易成功</option>
										<option value="7" <c:if test='${param.queryStatus ==7}'> selected</c:if>>交易关闭</option>
									</select>
								</p>
							</div>							
							<!-- <button>搜索</button> -->
						</div>
					</form>
					<div class="list clearfix">
						<p class="filter">近三个月订单 <img src="${ctx }/images/xl.png" alt="" /></p>
						<p class="name">宝贝</p>
						<p>单价</p>
						<p>数量</p>
						<p>收货人</p>
						<p>金额</p>
						<p>全部状态</p>
						<p>操作</p>
					</div>
					<div id="orderList">
					    <p class="load-line" style="position: fixed;top: 0;width: 0;height: 2px;background-color: red;"></p>
					</div>
				</div>
			</div> 
		</div>
		<!--分页-->
				<div class="clearfix" style="margin-top: -20px;margin-left: 35%;margin-bottom: 10px;">
					<ul class="page" maxshowpageitem="5" pagelistcount="5"  id="page"></ul>
				</div>
				<!--结束-->
				
			<!--猜你喜欢     标签开始-->
			<%@include file="like_goods.jsp"%>
			<!--猜你喜欢     标签结束-->
			
			<!--新闻-->
		<div class="recent_news container clearfix">	
		</div>
	<!--底部-->
	<%@include file="../common/bottom.jsp"%>
	<script type="text/javascript" src="${ctx }/js/bootstrap/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="${ctx }/js/bootstrap/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
	<script type="text/javascript" src="${ctx }/js/bootstrap/js/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
		
	<script type="text/javascript" src="${ctx}/js/order/all_order.js"></script>
     <script type="text/javascript">
	    function tt(dd){
	        //alert(dd);
	    }
	    var GG = {
	        "kk":function(mm){
	           // alert(mm);
	        }
	    }
	    
	    function initPage(){	 
	    	var commentStatus = $(".all_order .right .order_info form select[name=commentStatus]").find("option:selected").val();
		    var queryStatus = $(".all_order .right .order_info form select[name=queryStatus]").find("option:selected").val();
		    var orderStatus = $(".all_order .right .order_info form select[name=orderStatus]").find("option:selected").val();
		    var likeStr = $(".all_order .right .order_info form >p input[name=likeStr]").val();
		    
	    	$.ajax({
				type:"post",
				url:rootPath+"/order/orderQueryStatusCountList",
				data:{'memberId':member.mId,
					  'queryStatus':queryStatus,
					  'orderStatus':orderStatus,
					  'commentStatus':commentStatus,
					  'likeStr':likeStr,
					  'startTime':$("input[name='startTime']").val(),
					  'endTime':$("input[name='endTime']").val()},
				dataType:"JSON",
				success:function(data){			
					var size=5;

					size=data.queryStatus0count;
			    	$("#page").initPage(size,1,GG.kk);
				}
			});	
	    }
	    initPage();
		
</script>
	</body>
</html>
